package com.ross.mode;

/**
 * @version 1.0.0
 * @className: FriedChickenDecorator
 * @description: 装饰器
 * @author: zhangjunfa
 * @date: 2023/5/5 15:34
 */
public class FriedChickenDecorator implements FriedChicken {
    // 内部维护一个炸鸡类
    private FriedChicken friedChicken;

    // 通过构造方法把需要装饰的炸鸡类传进来
    public FriedChickenDecorator(FriedChicken friedChicken) {
        this.friedChicken = friedChicken;
    }

    public void makeFriedChicken() {
        friedChicken.makeFriedChicken();
        System.out.println("检查炸鸡是否存在问题");
    }
}
